package com.colin.aiyi.dao.ImpxUtils;

import com.colin.aiyi.app.Constant;
import com.colin.aiyi.entity.BannerEntity;

import org.xutils.http.RequestParams;

/**
 * Created by hl on 2017/6/9.
 */

public class ImpBannerList extends AbsServicexUtils {

    @Override
    public void onSuccess(String result) {
        super.onSuccess(result);
        super.onSuccess(result);
        if (callback==null)
        {
            BannerEntity bannerEntity=gson.fromJson(result,BannerEntity.class);
            sendMsgToView(bannerEntity);
        }else {
            BannerEntity bannerEntity=gson.fromJson(result,BannerEntity.class);
            callback.onSuccess(bannerEntity);
        }
    }

    @Override
    public <V> void getObject(V v) {
        super.getObject(v);
        RequestParams params=new RequestParams(Constant.list);
      //  params.addBodyParameter("accessToken","f8c40469e1ef4d958e738b30eb777585");
        sendToServer(params);
    }
}
